home *** CD-ROM | disk | FTP | other *** search
- Short: Shows TOC of AudioCDs in various ways
- Kurz: zeigt TOC von AudioCDs in vielen Varianten
- Author: amiga@rripley.de (Ralph Reuchlein)
- Uploader: amiga@rripley.de (Ralph Reuchlein)
- Type: disk/cdrom
- Version: 1.1
- Date: 20-Feb-2000
- Replaces: disk/cdrom/ShowTOC.lha
-
-
- ShowTOC
- =======
-
-
- PURPOSE
-
- Since I own a CD burner I made my own compilations from various CDs
- including AudioCDs containing my favourite Amiga modules. I also
- create my own CD labels I print and stick on my burnt CDs. Now I
- had the problem to find out the length of each burnt track and the
- information provided by the source CDs is wrong in most cases, so I
- decided to write a program that prints the contents of an AudioCD
- in a configurable way.
-
- This software is eMailware, which means, that if you like this
- piece of software, you have to write me an eMail (address see end
- of readme).
-
-
- HISTORY
-
-
- v1.1 (20-Feb-2000):
- - format types %b,%y,%c,%C,%p,%P added, descriptions and example
- see below
- - added additional info to option CDIDDIR to the readme since many
- people were confused about it
-
- v1.0 (09-Jan-2000):
- - public release
-
-
-
- INSTALL
-
- Simply unpack the archive to anywhere you want. I prefer to copy
- the executable to C:.
-
-
-
- REQUIREMENTS
-
- - OS 3.0 and higher
- - a SCSI interface
- - CDROM
- - AudioCDs :-)
-
-
-
- USAGE
-
- The template is
-
- DEVICE=D/K/A,UNIT=U/N/K/A,FORMAT=FMT/K,INTRODUCER=INTR/K,CDIDDIR/K,
- HEADFORMAT=HEADFMT/K,TAILFORMAT=TAILFMT/K,
- NOHEADER/S,NOLIST/S,NOTAIL/S
-
- You always have to provide the device name of your SCSI interface
- and the unit number of the device, which is usually
-
- unit = (BOARD * 100) + (LUN * 10) + SCSI_ID
-
- If you have only one SCSI interface, only the SCSI_ID is needed.
-
- FORMAT is the format string for each track on CD, HEADFORMAT is
- used for a header of the track list (e.g. CD ID) and TAILFORMAT for
- the end of the track list (e.g. length of CD). Each of the format
- parameters have default parameter:
-
- HEADFORMAT: " CD: %i%\n Title: %T%\nArtist(s): %a"
- FORMAT: "Track %2n: %d %t"
- TAILFORMAT: "CD length: %f"
-
- Available format types are:
-
- %sm Minutes of start time
- %ss Seconds of start time
- %sf frame fraction of start time
- %sd decimal fraction of start time
- %sa all frames of start time
- %s start time with format "%2sm:%02ss;%02sf"
- %sn number of first track
-
- %em Minutes of end time
- %es Seconds of end time
- %ef frame fraction of end time
- %ed decimal fraction of end time
- %ea all frames of end time
- %e end time with format "%2em:%02es;%02ef"
- %en number of last track
-
- %dm Minutes of duration
- %ds Seconds of duration
- %df frame fraction of duration
- %dd decimal fraction of duration
- %da all frames of duration
- %d duration with format "%2dm:%02ds;%02df"
-
- %fm Minutes of full CD time
- %fs Seconds of full CD time
- %ff frame fraction of full CD time
- %fd decimal fraction of full CD time
- %fa all frames of full CD time
- %f full CD time with format "%2fm:%02fs;%02ff"
-
- %n track number
- %N number of tracks
- %b track length in bytes
- %y type of track: AUDIO or DATA
- %c number of channels in track as numeric value
- %C number of channels in track as text
- %p Is digital copy of track "permitted" or "prohibited"?
- %P same as %p, but returns "y" or "n"
-
- %i CD id
- %T Title of CD
- %t Title of track
- %a Artist(s) of CD
- %l TOC length on CD in bytes
-
- %\n Special character: New line
- %\r Special character: Carriage return
- %\f Special character: Form feed
- %\t Special character: Tabulator
-
- As you can see, you have many opportunities to build your own
- format strings. Usage of format types for tracks in the header or
- tail strings is senseless, but possible (you will get unpredictable
- results). By the way I have to describe the difference between the
- 'frame fraction' and 'decimal fraction': Each second on an AudioCD
- has 75 frames, therefore I have two ways to show these fraction.
- First I can print out the number of frame in that second (the %xf
- format type, which is default) or I can calculate the decimal
- fraction (1/75th part) of one second (the %xd format type). For
- example a frame count of 47 (format type %xf) would print a 63
- (rounded up) with the format type %xd, where x is one of s, e, d
- and f.
-
- Each format type can be formatted like the printf() function from
- the C standard libraries. There is only one restriction: You cannot
- add a type qualifier to the type, e.g. "%lw" (must only be "%w").
- Some examples of formatting:
-
- %30t Track title will be displayed in a 30 column wide space.
- If the basename length is less than 30, it will be right
- filled by spaces.
- %-30t Equals %30n, but field will be left filled by spaces.
- %.4t Truncates track name to 4 characters or will be right
- filled if name length is less than 4.
- %04fm Writes minutes of complete CD in a 4 column wide field.
- If the number has less than 4 digits, it will be left
- filled with zeros instead of spaces.
-
- For more information refer to the C standard library documentation
- of printf(), sprintf() or fprintf().
-
- If you use ShowTOC in a script that also uses '%' as format
- introducer, you can switch to another introducer with the parameter
- INTRODUCER, e.g. to '$' or '&'. I recommend non-alpha characters.
-
- Now some background for the option CDIDDIR:
- Most CD player software on Amiga, e.g. OptyCDPlayer, ACDPlay, etc.,
- use a standardized format to store title information of an AudioCD.
- Each CD (even a pure data CD) has a TOC, otherwise it is
- unreadable. That TOC only stores the track length and some
- internal data. To store the title names of a CD, the CD player
- software writes it to CDID files which are stored in a single
- directory in your filesystem. Each time the CD player software
- recognizes a new inserted CD, it builds a unique CDID-Name and
- tries to read the file using that name. If the software finds a
- file with the name, it reads in the file contents and uses it for
- displaying the track names, artist name and cd name. If you do not
- use that track names at all, you never will get the track names for
- ShowTOC.
-
- If you now want to use these stored track names with ShowTOC, you
- have to specify the directory of these CDID files with the option
- CDIDDIR. If ShowTOC also recognizes the CD by its ID, it uses the
- CDID-Data in the same way like the CD player software. Thats all.
- There is no need to build up a separate TOC on CD or something
- else. A TOC is always written if a usual CD will be burnt.
-
- Finally you can turn off the three output blocks header, list
- and/or tail with the NOHEADER, NOLIST and NOTAIL switches.
-
- ShowTOC makes no difference between real audio tracks and data
- tracks, therefore you can print a track listing of e.g. an
- Aminet CD. To separate the types use the format type %y.
-
-
-
- EXAMPLES
-
- A call of ShowTOC with the device and unit only
-
- ShowTOC DEVICE=2060scsi.device UNIT=2
-
- will return a simple track list:
-
- CD: ID11009B58037CA6
- Title:
- Artist(s):
- Track 1: 4:18;15
- Track 2: 4:31;40
- Track 3: 4:11;45
- Track 4: 4:11;15
- Track 5: 4:30;55
- Track 6: 4:56;10
- Track 7: 4:27;45
- Track 8: 4:02;10
- Track 9: 4:40;02
- Track 10: 5:35;68
- Track 11: 5:21;25
- CD length: 50:46;68
-
- The lines "Title:" and "Artist(s):" are empty, because ShowTOC
- couldn't resolve the CD's name despite of the lack of parameter
- CDIDDIR. Using the same command including that parameter
-
- ShowTOC DEVICE=2060scsi.device UNIT=2 CDIDDIR=AUDIO:disks
-
- does print out
-
- CD: ID11009B58037CA6
- Title: Break Every Rule
- Artist(s): Tina Turner
- Track 1: 4:18;15 Typical Male
- Track 2: 4:31;40 What You Get Is What You See
- Track 3: 4:11;45 Two People
- Track 4: 4:11;15 Till The Right Man Comes Along
- Track 5: 4:30;55 Afterglow
- Track 6: 4:56;10 Girls
- Track 7: 4:27;45 Back Where You Started
- Track 8: 4:02;10 Break Every Rule
- Track 9: 4:40;02 Overnight Sensation
- Track 10: 5:35;68 Paradise Is Here
- Track 11: 5:21;25 I'll Be Thunder
- CD length: 50:46;68
-
-
- To get an extra output of track information stored on CD, you can
- add some format types:
-
- ShowTOC DEVICE=2060scsi.device UNIT=2 CDIDDIR=AUDIO:disks FMT="%2n: %d [%c chan/%-5y/Copy? %P/%9b] %t"
-
- This would print out:
-
- CD: ID05007EB5035435
- Title: Maxi She's The One
- Artist(s): Robbie Williams
- 1: 4:21;02 [2 chan/Audio/Copy? n/ 46045104] She's The One
- 2: 2:51;35 [2 chan/Audio/Copy? n/ 30246720] It's Only Us
- 3: 4:41;38 [2 chan/Audio/Copy? n/ 49657776] Millennium
- 4: 6:57;42 [2 chan/Audio/Copy? n/ 73657584] Coke & Tears
- 5: 29:37;23 [2 chan/Data /Copy? n/313516896] «Videos»
- CD length: 48:28;65
-
- You get some extra columns in brackets: First one is the number of
- channels (%c), second is the track type (%y), third answers the
- question if the track is permitted to be copied (%P) and the fourth
- is the length of the track in bytes (%b). The example CD has an
- extra data track with four QuickTime movies :)
-
- If you are only interested in the ID of the CD, the number of
- frames and the analogue runtime stored on your AudioCD, you simply
- need following shell command:
-
- ShowTOC DEVICE=2060scsi.device UNIT=2 NOHEADER NOLIST TAILFORMAT="%i: %fa frames = %f mins"
-
- that returns
-
- ID11009B58037CA6: 228518 frames = 50:46;68 mins
-
- It makes no difference if you use TAILFORMAT and NOHEADER or
- HEADFORMAT and NOTAIL, because both will print the same result.
-
-
- Final note: Using NOHEADER, NOLIST and NOTAIL together is silly,
- because you got no output, but this combination can be used to
- check whether a CD is inserted in your CDROM drive (you will get a
- error message otherwise).
-
-
-
- BUGS
-
- *kough* What's that?
-
-
-
- DISCLAIMER
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
-
-
- MISC
-
- Suggestions and bug reports are welcome, but I think the little
- program's purpose is fully accomplished.
-
-
-
- OTHER TOOLS
-
- picsize Shows picture dimensions using datatypes
- (Aminet: util/dtype/picsize.lha, v1.2)
-
- NewWinBox Changes window dimension and position
- (Aminet: util/cli/NewWinBox.lha, v1.0)
-
- MCD_DirList Generates file lists for MakeCD
- (Aminet: disk/cdrom/MCD_DirList.lha, v1.0)
-
-
-
- CONTACT
-
- snail Ralph Reuchlein
- mail: Eibseestr. 18c
- 86163 Augsburg
- GERMANY
-
- eMail: amiga@rripley.de
- WWW: http://www.rripley.de
- IRC: RRipley on #germany
-
-